package com.freestyle.multidatasource;

import org.springframework.jdbc.datasource.DataSourceTransactionManager;

import javax.sql.DataSource;

/**
 * 弃用，在DatasourceConfig里面注册一个带multidatasource的事务管理器即可。
 * Created by rocklee on 2021/12/2 16:44
 */
@Deprecated
public class MultiDataSourceTransactionManager extends DataSourceTransactionManager {
  @Override
  public DataSource getDataSource(){
      //return DataSourceRegister.getCustomDataSource(DataSourceContextHolder.getDataSource());
    DataSource ds=super.getDataSource();
    System.out.println(ds);
    return ds;
  }

}
